package o;

import android.app.Activity;
import android.app.ActivityManager;
import android.content.Intent;
import androidx.annotation.NonNull;
import java.util.concurrent.ConcurrentHashMap;

public class cgx {
    private static final ConcurrentHashMap<String, Integer> ˋ = new ConcurrentHashMap();

    public static void ˋ(@NonNull Activity activity) {
        if (ˋ.size() > 0) {
            Intent intent = activity.getIntent();
            if (intent == null || !"com.android.packageinstaller".equals(intent.getStringExtra("THIRD_APP_CALLER_PKG"))) {
                for (Integer num : ˋ.values()) {
                    if (num != null) {
                        ((ActivityManager) activity.getSystemService("activity")).moveTaskToFront(num.intValue(), 0);
                        return;
                    }
                }
                return;
            }
            Logger.ˎ("ActivityTaskManager", "packageinstall open hispace.");
        }
    }

    public static void ˎ(String str, int i) {
        ˋ.put(str, Integer.valueOf(i));
    }

    public static void ˊ(String str) {
        ˋ.remove(str);
    }
}
